#pragma once
#include "interfaces/InputOutputPlugin.h"
#include "ExampleModel.h"

/// Make this function valid only in this file
namespace{
    bool isaExample(Model* model){
        return qobject_cast<ExampleModel*>(model);
    }
    ExampleModel* safeCast(Model* model){
        ExampleModel* _model = qobject_cast<ExampleModel*>(model);
        if(!_model) throw StarlabException("Model is not a SurfaceMeshModel");
        return _model;
    }
}

class ExampleInputOutputPlugin : public InputOutputPlugin{
private: 
    bool isApplicable(Model* model){ return isaExample(model); }
};
